const parsedUrl = new URL(document.currentScript.src);
var commonbasePath=parsedUrl.origin;
var basePath=getRootPath();

// Element-UI
document.write('<link rel="stylesheet" type="text/css" href="'+commonbasePath+'/common/vue/plugins/2.15.12/element.css" async />');
document.write('<script src="'+commonbasePath+'/common/jquery/jquery.min.js" type="text/javascript" ></script>');
document.write('<script src="'+commonbasePath+'/common/jquery/cookie/jquery.cookie.min.js" type="text/javascript" ></script>');
// Vue + Element-UI
document.write('<script src="'+commonbasePath+'/common/vue/vue.2.7.7.min.js" type="text/javascript"  ></script>');
document.write('<script src="'+commonbasePath+'/common/vue/plugins/2.15.12/element.js" type="text/javascript" ></script>');
/* 加载echarts */
// document.write('<script src="'+commonbasePath+'/common/echarts/echarts.min.js" type="text/javascript" ></script>');
/*
 获取网站目录
 */
function getRootPath() {
	var pathName=window.document.location.pathname;
	var projectName=pathName.substring(0,pathName.substr(1).indexOf('/')+1);
	return "http://"+location.host +projectName ;
}
